package cn.pupil.design.user.impl;

import cn.pupil.design.user.User;
import cn.pupil.design.visitor.Visitor;

import java.math.BigDecimal;

/**
 * @Description: 老师类
 * @Author: pupil
 * @Date: 2024/08/02 上午 10:30
 */
public class Teacher extends User {

    public Teacher(String name, String identity, String clazz) {
        super(name, identity, clazz);
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }

    // 升本率
    public double entranceRatio(){
        return BigDecimal.valueOf(Math.random()*100).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
    }
}
